package com.beiding.workordersystem.common.utils;

import org.springframework.beans.BeanUtils;

public class MyBeanUtils {
    public static <T> T copy(Object obj, Class<T> t) {
        try {
            T instance = t.newInstance();
            BeanUtils.copyProperties(obj, instance);
            return instance;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
